<!DOCTYPE html>
<style>
  fieldset {
    float: left;
  }
  legend {
    font: 10px Ahem;
  }
  legend.left {
    margin-left: 100px;
  }
  legend.right {
    margin-right: 100px;
  }
</style>
<fieldset>
  <legend id="first" class="left">Legend</legend>
</fieldset>
<fieldset>
  <legend id="second" class="right">Legend</legend>
</fieldset>
<script src="../../../resources/js-test.js"></script>
<script>
  var legend = document.getElementById("second");
  shouldBeEqualToNumber("legend.getBoundingClientRect().left", 220);
</script>
